package com.cy.dao;

import com.cy.pojo.Student;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * Created with IDEA2020.3.3 JDK1.8 Mysql 5.7 maven3.6.3
 *
 * @Auther: 张鹏宇
 * @Date: 2021/04/12/15:55
 * @Description:
 */
public interface StudentDao {
    /**
     * @return com.cy.pojo.Student
     * @Author ZPY
     * @Date 23:49 2021/6/15
     * @Description: //TODO 根据ID查询相应的用户
     * @Param [id]
     */
    public Student selectStudentById (@Param ("studentId") Integer id);


    List<Student> selectMultiParam (@Param ("myname") String name,
                                    @Param ("myage") Integer id);

    int countStudent ();

    Map<Object, Object> selectMapById (Integer id);


    /**
     * @return java.util.List<com.cy.pojo.Student>
     * @Author ZPY
     * @Date 0:49 2021/6/17
     * @Description: //TODO 使用resultMap 定义结果映射关系
     * @Param []
     */
    List<Student> selectAllStudents ();


    List<Student> selectAllStudents2 ();


    /**
     * @return java.util.List<com.cy.pojo.Student>
     * @Author ZPY
     * @Date 17:14 2021/6/20
     * @Description: //TODO 根据名字模糊查询
     * @Param [name]
     */
    List<Student> selectLikeOne (String name);

    
    /**
     * @Author ZPY
     * @Date 17:26 2021/6/20
     * @Description: //TODO name就是李这个值,在mapper中拼接 like %李%
     * @Param [name]
     * @return java.util.List<com.cy.pojo.Student>
     */
    List<Student> selectLikeTwo(String name);
}
